-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup files.PublishedStorage after dropping a publish #1381
Conversation
@neolynx here is another annoying thing I'd like to fix in aptly. My publish prefix is bloated with empty directories as I have to create and remove publishes intensively. |
oh, yes please ! I found this quite annoying as well... |
yay, there is an issue for it! #198 |
527a843
to
ab96dc7
Compare
d5f937b
to
6809929
Compare
@neolynx original tests that were failing are now fixed, but my newly added PublishDrop21Test is failing, not sure why... May be it's time for me to learn something new, too? 😁 This alienish test suite is driving me nuts, frankly... |
05f0908
to
3b33303
Compare
All tests are passing now |
great ! could you explain why they failed ?
please do not judge :) the history of all of this is in git, many people worked on that. I think the thing to learn here is how to deal with legacy code and how to slowly improve it and revive the project. so please be respectful and constructive, we are all aware of the state of things, and it took months to get it to a working and halfway reliable state. |
-gold file was missing for my PublishDrop21Test - copied it from PublishDrop2Test. Not completely sure what it is. Whole experience of adding tests is cumbersome and non-obvious due to lack of developers documentation. Even some doc links to the testing frameworks would make the whole process more friendly and smooth... Oh, and original tests were failing because checks relied on empty directories now removed (as you said, the history of all of this is in git :-) ) |
ok great. in the Makefile there is the CAPTURE flag, you can uncomment, then the tests will create the gold files.
as said before, we are well aware of that. feel free to contribute. until then let's keep the discussions here technical.
thanks, that is excellent :-) |
ab0c5e5
to
81d0034
Compare
tests look good ! I started a coverage build: codecov/patch — 84.61% of diff hit (target 74.84%) |
5750df4
to
ddc84c5
Compare
Seems, ci is stuck again... |
seems we have a segfault: |
Heh, that's because nil is passed instead of P.S.: handled that on my side |
ddc84c5
to
268e056
Compare
Now, seems |
it needs that non empty check before remove... ;-) |
Also, something wrong with docker tests:
So, for me there is no simple way to update test now, unfortunately. |
You know what, my experience contributing in this particular PR is drastically falling down. Second day in a row we're chewing through tons of comments in a changeset that barely changes nothing, docs on testsuite are missing, tooling does not work and you're making jokes on me... That all really makes me sad. |
the docker-wrapper sets the user to the one of the git repo directory, to not write files as root. it seems your git dir is owned by root. changing to user owner would solve this in that case. |
not true
Thanks for the docker-wrapper idea, though. Slashed it a bit. |
268e056
to
0c9fe00
Compare
Re: better tooling #1384 It might be worth merging it first. |
A friendly ping for @neolynx Tests are fixed now. Let's finish those two PRs, we're on the homestretch ;) |
0c9fe00
to
33d5123
Compare
This comment was marked as resolved.
This comment was marked as resolved.
33d5123
to
3592987
Compare
After dropping files.PublishedStorage there were some leftovers - empty directory tree. If that directory tree is empty, it is now removed. Fixes: aptly-dev#198
3592987
to
eeca154
Compare
Rebased to the tip of P.S.: Failing tests are not mine. |
@@ -0,0 +1,5 @@ | |||
Removing ${HOME}/.aptly/public/ppa/smira/dists... | |||
Removing ${HOME}/.aptly/public/ppa/smira/pool... | |||
{"level":"debug","time":"now","message":"CleanupPublishTree: remove ${HOME}/.aptly/public/ppa: directory not empty. '${HOME}/.aptly/public/ppa' not removed\n"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to use normal logging here, no json to console...
resources from the internet are not always available, I restarted the tests. |
Dear @aol-nnov, I was by no means making jokes on you, i was merely a wink to point out what is expected here. Your skills and contributions are very welcome, also for documentation and all the other stuff which is lagging behind ! I talked to some of the other maintainers, here are our thougths:
To move forward here, we suggest the following changes:
Please understand that aptly is a legacy project with many maintainers and contributors over the years. It took considerable effort to revive it and bring it to the state it is now. As maintainers, our main concern is to not break any of potentially thousands of installations, and if something happens, we have proper logs. And this has some implications on how we can implement things. @cfiehe, @szakalboss, @dario-gallucci please add if I forgot something |
Dear @neolynx, First of all, I'd like to point that all stated below is not personal offence, but a feedback for the project maintainer handling incoming changes. Overall experience during contributing to this miserly PR was cumbersome and disappointing. Starting from constantly changing and somewhat controversial requirements (I'm not even asking now how would checking directory for the emptiness before removal will aid 404s on missing dirs and such and such) up to never-ending discussions which made me feel totally not understood, and to suddenly-disappearing-reviewer right in the middle of threads without any notice on coming-back-or-not and many other obstacles along the way... As we know, all good things eventually come to their end. So do my resources, that I'm able to invest into this PR. Feel free to implement this change exactly "the way you feel", as all technical reasons I brought to you were discarded or ignored by you along the way. Also feel free to take the credits for this change - I do not mind. Our enterprise is heavily using aptly in production for over a decade now (and contributing to it, as well), and we were forced to operate on our fork for a few times already, rather than upstrean version due to abandonedness or the project, beurocracy of accepting patches or mantainer's irresponsiveness. Sadly, it seems, we're on the fork again. We need to mind our business, not to prove something on the Internet. Good luck and thanks for all the fish. (Making it clear: I'm no longer able to work on this PR.) |
Fixes: #198
After dropping files.PublishedStorage there were some leftovers - empty directory tree. If that directory tree is empty, it is now removed.
Checklist